package com.yan.demo.method;

public class MethodTest3 {
    public static void main(String[] args) {
        double min = getMin(3.14,5.34);
        System.out.println("最小值为:" + min);
    }

    // 定义有返回值有参数方法找最小值
    public static double getMin(double num1 , double num2){
        if(num1 > num2){
            return num2;
        } else {
            return num1;
        }
    }
}
